package day1223;

import day1221.Month;

public class Test1 {

    //1.main方法
    public static void main(String[] args) {
        int  trUe;

        //方法名(参数的值1，  参数的值2);
        judgeDays(Month.DECEMBER,   2024);
    }

    /**2.judgeDays： 判断m月有多少天的方法*/
    static void judgeDays(Month m,   int year){
        switch (m){
            case JANUARY: System.out.println(31+"天");break;
            case FEBRUARY: System.out.println( (year%400==0 ||(year%4==0&&year%100!=0) )?29:28 );break;
            case MARCH: System.out.println(31+"天");break;
            case APRIL: System.out.println(30+"天");break;
            case MAY: System.out.println(31+"天");break;
        }
    }

}







